package com.ttbj.product.salesman.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ttbj.api.exception.BusinessException;
import com.ttbj.api.salesman.RolePermissionService;
import com.ttbj.salesman.dao.RolePermissionMapper;


@Service("rolePermissionService")
public class RolePermissionServiceImpl implements RolePermissionService{
	
	@Autowired
	private RolePermissionMapper rolePermissionMapper;
	
	
	@Override
	public void updateRolePermission(List<Long> rolePermission, Long roleId) throws BusinessException {
		this.rolePermissionMapper.deletRolePermissionByID(roleId);
		this.rolePermissionMapper.addRolePermission(rolePermission,roleId);
	}

}
